//
//  NSObject+IcangMutable.m
//  Icang4IphoneApp
//
//  Created by shanbei ios on 12-9-10.
//  Copyright (c) 2012年 Icang ios. All rights reserved.
//

#import "IcangMutable.h"

@implementation NSMutableArray (XinDong)

- (void)addSafeObject:(id)anObject {
    if (nil == anObject) {
        return;
    }
    else {
        [self addObject:anObject];
    }
}

- (void)insertSafeObject:(id)anObject atIndex:(NSUInteger)index {
    if (nil == anObject) {
        return;
    }
    else {
        [self insertObject:anObject atIndex:index];
    }
}

@end

@implementation NSMutableSet (XinDong)

- (void)addSafeObject:(id)anObject {
    if (nil == anObject) {
        return;
    }
    else {
        [self addObject:anObject];
    }
}

@end
